constraint guide: Fix initial property values
authorMatthias Clasen <mclasen@redhat.com>
Sat, 29 Jun 2019 22:13:41 +0000 (22:13 +0000)
committerEmmanuele Bassi <ebassi@gnome.org>
Sun, 30 Jun 2019 23:10:11 +0000 (00:10 +0100)
This was overlooked when the max-width/max-height/
strength properties were added.

gtk/gtkconstraintguide.c

index b6db1554b228f1da8588458991d7329f28c5974b..f39478706716595d12053ebadee122208f2bbcaa 100644 (file)
@@ -94,6 +94,15 @@ G_DEFINE_TYPE_WITH_CODE (GtkConstraintGuide, gtk_constraint_guide, G_TYPE_OBJECT
 static void
 gtk_constraint_guide_init (GtkConstraintGuide *guide)
 {
+  guide->strength = GTK_CONSTRAINT_STRENGTH_MEDIUM;
+
+  guide->values[MIN_WIDTH] = 0;
+  guide->values[MIN_HEIGHT] = 0;
+  guide->values[NAT_WIDTH] = 0;
+  guide->values[NAT_HEIGHT] = 0;
+  guide->values[MAX_WIDTH] = G_MAXINT;
+  guide->values[MAX_HEIGHT] = G_MAXINT;
+
   guide->bound_attributes =
     g_hash_table_new_full (g_str_hash, g_str_equal,
                            NULL,